home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
351-375
/
359
/
dice
/
dice.lzh
/
lib
/
fd
/
makefd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-04-01
|
553b
|
33 lines
/*
* MAKEFD.C
*
* (c)Copyright 1990, Matthew Dillon, All Rights Reserved
*
* Used by routines that want to get into our low level io system. If exec
* is NULL then handle is an AmigaDOS file handle. If exec is not NULL then
* it is a function capable of executing ioctls.
*/
#include <stdio.h>
#include <fcntl.h>
int
MakeFd(handle, flags, exec)
long handle;
long flags;
long (*exec)();
{
int fd;
_IOFDS *d = _MakeFD(&fd);
d->fd_Fh = handle;
d->fd_Flags = flags | O_ISOPEN;
d->fd_Exec = exec;
return(fd);
}